-- GENERATED SPELL FOR [Wyrmcult Acolyte] --


function spell0_21383(pUnit, Event) --@Blessing of the Black,Self--
pUnit:FullCastSpellOnTarget(37635,pUnit)
pUnit:RegisterEvent('Sorts_21383', 4100, 1)
end

function spell1_21383(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(11969,pUnit)
pUnit:RegisterEvent('Sorts_21383', 2000, 1)
end

function spell2_21383(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21383', 3000, 1)
end

function spell3_21383(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(32707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21383', 2500, 1)
end

function spell4_21383(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(17139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21383', 30323, 1)
end

function Sorts_21383(pUnit, Event)
local choix_sorts_21383 = math.random(0, 4)
if choix_sorts_21383 == 0 then
pUnit:RegisterEvent('spell0_21383', 1, 1)
end
if choix_sorts_21383 == 1 then
pUnit:RegisterEvent('spell1_21383', 1, 1)
end
if choix_sorts_21383 == 2 then
pUnit:RegisterEvent('spell2_21383', 1, 1)
end
if choix_sorts_21383 == 3 then
pUnit:RegisterEvent('spell3_21383', 1, 1)
end
if choix_sorts_21383 == 4 then
pUnit:RegisterEvent('spell4_21383', 1, 1)
end
end

function mob21383_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21383', math.random(1500, 3000), 1)
end

function mob21383_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21383_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21383_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21383, 1, 'mob21383_Action')
RegisterUnitEvent(21383, 2, 'mob21383_Leave')
RegisterUnitEvent(21383, 3, 'mob21383_Kill')
RegisterUnitEvent(21383, 4, 'mob21383_Die')
